package web.stu.common;

import lombok.Getter;

/**
 * 自定义状态码
 */
@Getter
public enum ErrorCode {
    SUCCESS(200, "成功"),
    PRIMARY_ERROR(400, "请求参数错误"),
    NO_AUTH_ERROR(401, "无权限"),
    NOT_LOGIN_ERROR(402, "未登录"),
    NOT_FOUND(404, "资源未找到"),
    SYSTEM_ERROR(500, "服务器异常");

    /**
     * 状态码
     */
    private int code;
    /**
     * 错误信息
     */
    private String message;

    ErrorCode(int code, String message) {
        this.code = code;
        this.message = message;
    }


}
